//app.js
var util = require("./utils/util.js");
App({
    onLaunch: function () {
        var that = this;
        var userInfo = wx.getStorageSync("userInfo");
        if(userInfo == ""){
            that.globalData.isShouQuan = false;
            wx.switchTab({
                url: '/pages/mine/mine',
            });
            return false;
        }
        wx.getUserInfo({
            success: res => {
                that.globalData.isShouQuan = true;
            },
            fail: err => {
                that.globalData.isShouQuan = false;
                wx.switchTab({
                    url: '/pages/mine/mine',
                })
            }
        })
    },
    globalData: {
        userInfo: null,
        isShouQuan: false
    },
})